This invention relates in general to operating system registries, such as the registry provided in the Windows NT(copyright) operating system from Microsoft Corporation of Redmond, Wash. More specifically, this invention relates to devices and methods for manipulating an operating system registry to maintain coherency between the registry and disk partitions.
xe2x80x9cPartitioningxe2x80x9d refers to a process by which a computer storage device, such as a hard disk, is divided into multiple logical devices. For example, a computer user wishing to run both the Windows NT(copyright) and Linux(copyright) operating systems from a single hard disk might partition the disk into two logical devicesxe2x80x94one for running Windows NT(copyright), and the other for running Linux(copyright).
The assignee of this invention, PowerQuest Corporation, has developed partitioning software (referred to as xe2x80x9cPartitionMagic(copyright)xe2x80x9d) to assist computer users in the partitioning process described above. Various implementations of this software are described in detail in U.S. Pat. Nos. 5,675,769 and 5,706,472 to Ruff et al., and U.S. Pat. No. 5,930,831 to Marsh et al.
When running as a Win32 program (i.e., a 32-bit Windowse program) under the Windows NT(copyright) operating system, PartitionMagic(copyright) can only operate on partitions that have no open files. Since the Windows NT(copyright) operating system always has at least some open files running from its own partition, PartitionMagic(copyright) cannot operate on the Windows NT(copyright) partition when it runs as a Win32 program.
Accordingly, PartitionMagic(copyright) has been designed to also run in the Windows NT(copyright) boot mode, where it can operate on all partitions, including the Windows NT(copyright) partition. In this mode, the Windows NT(copyright) kernel loads first. The kernel then loads any device drivers. A portion of the kernel referred to as the xe2x80x9cSession Managerxe2x80x9d then executes any programs that require hard disk access before the Windowse user interface is loaded. In addition to PartitionMagic(copyright), such programs include xe2x80x98autochk.exexe2x80x99 (a utility for checking the condition of the hard disk) and xe2x80x98autoconv.exexe2x80x99 (a utility for performing file system conversions), both from Microsoft(copyright) Corporation, and xe2x80x98autofat.exexe2x80x99 and xe2x80x98autontfs.exexe2x80x99 (utilities for file defragmentation), both from Executive Software, Inc. Once these programs have executed, the Session Manager generally loads the Windows(copyright) user interface to initiate the Windows NT(copyright) Win32 mode, although PartitionMagic(copyright) reboots instead.
PartitionMagic(copyright) reboots after executing in the Windows NT(copyright) boot mode because it typically manipulates the Windows NT(copyright) partition itself If PartitionMagic(copyright) did not reboot after execution in boot mode, Windows NT(copyright) would likely crash when it attempted to load the Windows(copyright) user interface from the Windows NT(copyright) partition, because it wouldn""t be able to find the interface on the newly partitioned hard drive.
Windows NT(copyright) stores disk layout information (e.g., drive letter assignments and information regarding multiple partition volumes, such as stripe sets) in the Windows NT(copyright) registry under a key named xe2x80x9cHKEY_LOCAL_MACHINE SYSTEM DISK Informationxe2x80x9d. Changes can be made to this key by PartitionMagic(copyright) during the Windows NT(copyright) boot mode by making calls to the Windows NT(copyright) Registry API (Application Programming Interface). Unfortunately, these changes are discarded before taking effect when PartitionMagic(copyright) reboots instead of loading the Windows(copyright) user interface.
While PartitionMagic(copyright) typically needs to reboot after executing in the Windows NT(copyright) boot mode, it also needs to be able to manipulate the disk layout information key referred to above so that the disk layout information contained in the key is consistent with the information stored in partition tables on the hard disk being partitioned. If the information in the key and the information in the partition tables is not consistent, then Windows NT(copyright) makes default drive letter assignments that may not match the user""s wishes and needs.
Accordingly, since the changes to the disk layout information key referred to above are discarded when PartitionMagic(copyright) reboots, there is a need in the art for an alternative means and method for manipulating a registry (e.g., the disk layout information key) so, for example, it conforms to the information in the partition tables on a hard disk being partitioned. Such a means and method should be effective despite a reboot.
In accordance with this invention, data stored in an operating system configuration settings repository (e.g., a Windows registry) that includes one or more repository files is modified by accessing operating system services associated with the repository in a user interface mode of the operating system to store a modified form of the data in the repository. The repository files are then directly edited in a boot mode of the operating system to replace the data with the modified form of the data.
In another embodiment of this invention, a storage device is repartitioned by making Windows NT calls in a Windows NT Win32 mode to store repartitioning information in a temporary disk layout information registry key. Then, in a Windows NT boot mode, partition tables stored on the storage device are modified to match the repartitioning information, and registry files containing the temporary disk layout information registry key and a primary disk layout information registry key are directly edited to replace the primary disk layout information registry key with the temporary disk layout information registry key.
In still another embodiment of this invention, a storage device is repartitioned by accessing operating system services in a user interface mode of an operating system to store repartitioning information in an operating system configuration settings repository that comprises one or more repository files. Then, in a boot mode of the operating system, the storage device is repartitioned using the repartitioning information, and the repository files are directly edited to replace partitioning information stored therein with the repartitioning information.
In yet another embodiment of this invention, an apparatus for modifying data stored in an operating system configuration settings repository that comprises one or more repository files includes a device that accesses operating system services associated with the repository in a user interface mode of the operating system to store a modified form of the data in the repository. Also, another device directly edits the repository files in a boot mode of the operating system to replace the data with the modified form of the data.
In an additional embodiment of this invention, the apparatus described immediately above is incorporated into an electronic system that includes an input device, an output device, a processor device, and a memory device.
In a still additional embodiment of this invention, a computer-readable medium has computer program portions embodied therein that modify data stored in an operating system configuration settings repository made up of one or more repository files. The computer program portions include a computer program portion that accesses operating system services associated with the repository in a user interface mode of the operating system to store a modified form of the data in the repository, and a computer program portion that directly edits the repository files in a boot mode of the operating system to replace the data with the modified form of the data.